<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Design Patterns</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Design_Patterns"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Design_Patterns rootpage-Design_Patterns skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><i>Design Patterns</i></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">This article is about the book. For the generic articles, see <a href="Software_design_pattern" title="Software design pattern">software design pattern</a> and <a href="Design_pattern" title="Design pattern">design pattern</a>.</div>
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */
.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style>
<p class="mw-empty-elt">
</p>
<style data-mw-deduplicate="TemplateStyles:r1295905060">
/* start https://en.wikipedia.org/ */
.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1287740527">
/* start https://en.wikipedia.org/ */
.mw-parser-output .ib-book .infobox-title{font-style:italic;padding-bottom:0.2em}.mw-parser-output .ib-book .Z3988{display:none}.mw-parser-output .ib-book .infobox-below{border-top:#aaa 1px solid}
/* end https://en.wikipedia.org/ */
</style><table class="infobox ib-book vcard"><caption class="infobox-title">Design Patterns:<br>Elements of Reusable <span class="nowrap">Object-Oriented</span> Software </caption><tbody><tr><td colspan="2" class="infobox-image"></td></tr><tr><th scope="row" class="infobox-label">Author</th><td class="infobox-data"><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */
.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}
/* end https://en.wikipedia.org/ */
</style><div class="plainlist"><ul><li><a href="Erich_Gamma" title="Erich Gamma">Erich Gamma</a></li><li><a href="Richard_Helm" title="Richard Helm">Richard Helm</a></li><li><a href="Ralph_Johnson_(computer_scientist)" title="Ralph Johnson (computer scientist)">Ralph Johnson</a></li><li><a href="John_Vlissides" title="John Vlissides">John Vlissides</a></li></ul></div></td></tr><tr><th scope="row" class="infobox-label">Subject</th><td class="infobox-data"><a href="Design_pattern" title="Design pattern">Design patterns</a>, <a href="Software_engineering" title="Software engineering">software engineering</a>, <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a></td></tr><tr><th scope="row" class="infobox-label">Publisher</th><td class="infobox-data"><a href="Addison-Wesley" title="Addison-Wesley">Addison-Wesley</a></td></tr><tr><th scope="row" class="infobox-label"><div style="display: inline-block; line-height: 1.2em; padding: .1em 0;">Publication date</div></th><td class="infobox-data">1994</td></tr><tr><th scope="row" class="infobox-label">Publication place</th><td class="infobox-data">United States</td></tr><tr><th scope="row" class="infobox-label">Pages</th><td class="infobox-data">395</td></tr><tr><th scope="row" class="infobox-label"><a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a></th><td class="infobox-data"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><bdi>0-201-63361-2</bdi></td></tr><tr><th scope="row" class="infobox-label"><a href="OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)"><abbr title="Online Computer Library Center number">OCLC</abbr></a></th><td class="infobox-data"><a rel="nofollow" class="external text" href="https://www.worldcat.org/oclc/31171684">31171684</a></td></tr><tr><th scope="row" class="infobox-label"><div style="display: inline-block; line-height: 1.2em; padding: .1em 0;"><a href="Dewey_Decimal_Classification" title="Dewey Decimal Classification">Dewey Decimal</a></div></th><td class="infobox-data">005.1/2 20</td></tr><tr><th scope="row" class="infobox-label"><a href="LCC_(identifier)" class="mw-redirect" title="LCC (identifier)"><abbr title="Library of Congress Classification">LC Class</abbr></a></th><td class="infobox-data">QA76.64 .D47 1995</td></tr></tbody></table>
<p><i><b>Design Patterns: Elements of Reusable Object-Oriented Software</b></i> (1994) is a <a href="Software_engineering" title="Software engineering">software engineering</a> book describing <a href="Software_design_pattern" title="Software design pattern">software design patterns</a>. The book was written by <a href="Erich_Gamma" title="Erich Gamma">Erich Gamma</a>, <a href="Richard_Helm" title="Richard Helm">Richard Helm</a>, <a href="Ralph_Johnson_(computer_scientist)" title="Ralph Johnson (computer scientist)">Ralph Johnson</a>, and <a href="John_Vlissides" title="John Vlissides">John Vlissides</a>, with a foreword by <a href="Grady_Booch" title="Grady Booch">Grady Booch</a>. The book is divided into two parts, with the first two chapters exploring the capabilities and pitfalls of <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a>, and the remaining chapters describing 23 classic <a href="Software_design_pattern" title="Software design pattern">software design patterns</a>. The book includes examples in <a href="C%2B%2B" title="C++">C++</a> and <a href="Smalltalk" title="Smalltalk">Smalltalk</a>.
</p><p>It has been influential to the field of software engineering and is regarded as an important source for object-oriented design theory and practice. More than 500,000 copies have been sold in English and in 13 other languages.<sup id="cite_ref-copies-sold_1-0" class="reference"><a href="#cite_note-copies-sold-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> The authors are often referred to as the <i>Gang of Four</i> (GoF).<sup id="cite_ref-gof1_2-0" class="reference"><a href="#cite_note-gof1-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-gof2_3-0" class="reference"><a href="#cite_note-gof2-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-gof3_4-0" class="reference"><a href="#cite_note-gof3-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-gof4_5-0" class="reference"><a href="#cite_note-gof4-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Development_and_publication_history">Development and publication history</h2></div>
<p>The book started at a birds-of-a-feather session at the 1990 <a href="OOPSLA" title="OOPSLA">OOPSLA</a> meeting, "Towards an Architecture Handbook", where Erich Gamma and Richard Helm met and discovered their common interest. They were later joined by Ralph Johnson and John Vlissides.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> The book was originally published on 21 October 1994, with a 1995 copyright, and was made available to the public at the 1994 OOPSLA meeting.
</p>
<div class="mw-heading mw-heading2"><h2 id="Introduction">Introduction</h2></div>
<p>Chapter 1 is a discussion of <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented</a> design techniques, based on the authors' experience, which they believe would lead to good object-oriented software design, including:
</p>
<ul><li>"Program to an interface, not an implementation." (Gang of Four 1995:18)</li>
<li><a href="Composition_over_inheritance" title="Composition over inheritance">Composition over inheritance</a>: "Favor '<a href="Object_composition" title="Object composition">object composition</a>' over '<a href="Inheritance_(object-oriented_programming)" title="Inheritance (object-oriented programming)">class inheritance</a>'." (Gang of Four 1995:20)</li></ul>
<p>The authors claim the following as advantages of <a href="Interface_(computer_science)" class="mw-redirect" title="Interface (computer science)">interfaces</a> over implementation:
</p>
<ul><li>clients remain unaware of the specific types of objects they use, as long as the object adheres to the interface</li>
<li>clients remain unaware of the classes that implement these objects; clients only know about the abstract class(es) defining the interface</li></ul>
<p>Use of an interface also leads to <a href="Dynamic_dispatch" title="Dynamic dispatch">dynamic binding</a> and <a href="Polymorphism_(computer_science)" title="Polymorphism (computer science)">polymorphism</a>, which are central features of object-oriented programming.
</p><p>The authors refer to <a href="Inheritance_(object-oriented_programming)" title="Inheritance (object-oriented programming)">inheritance</a> as <i><a href="White_box_(software_engineering)" title="White box (software engineering)">white-box</a> reuse</i>, with white-box referring to visibility, because the internals of parent classes are often visible to <a href="Subclass_(computer_science)" class="mw-redirect" title="Subclass (computer science)">subclasses</a>. In contrast, the authors refer to <a href="Object_composition" title="Object composition">object composition</a> (in which objects with well-defined interfaces are used dynamically at runtime by objects obtaining references to other objects) as <i><a href="Black_box" title="Black box">black-box</a> reuse</i> because no internal details of composed objects need be visible in the code using them.
</p><p>The authors discuss the tension between inheritance and encapsulation at length and state that in their experience, designers overuse inheritance (Gang of Four 1995:20). The danger is stated as follows:
</p>
<dl><dd>"Because inheritance exposes a <a href="Subclass_(computer_science)" class="mw-redirect" title="Subclass (computer science)">subclass</a> to details of its parent's implementation, it's often said that 'inheritance breaks encapsulation'". (Gang of Four 1995:19)</dd></dl>
<p>They warn that the implementation of a subclass can become so bound up with the implementation of its parent class that any change in the parent's implementation will force the subclass to change. Furthermore, they claim that a way to avoid this is to inherit only from abstract classes—but then, they point out that there is minimal code reuse.
</p><p>Using inheritance is recommended mainly when adding to the functionality of existing components, reusing most of the old code and adding relatively small amounts of new code.
</p><p>To the authors, 'delegation' is an extreme form of object composition that can always be used to replace inheritance. Delegation involves two objects: a 'sender' passes itself to a 'delegate' to let the delegate refer to the sender. Thus the link between two parts of a system are established only at runtime, not at compile-time. The <a href="Callback_(computer_science)" class="mw-redirect" title="Callback (computer science)">Callback</a> article has more information about delegation.
</p><p>The authors also discuss so-called parameterized types, which are also known as <a href="Generic_programming" title="Generic programming">generics</a> (<a href="Ada_(programming_language)" title="Ada (programming language)">Ada</a>, <a href="Eiffel_(programming_language)" title="Eiffel (programming language)">Eiffel</a>, <a href="Generics_in_Java" title="Generics in Java">Java</a>, <a href="C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a>, <a href="Visual_Basic_(.NET)" title="Visual Basic (.NET)">Visual Basic (.NET)</a>, and <a href="Delphi_(software)" title="Delphi (software)">Delphi</a>) or templates (<a href="C%2B%2B" title="C++">C++</a>). These allow any type to be defined without specifying all the other types it uses—the unspecified types are supplied as 'parameters' at the point of use.
</p><p>The authors admit that delegation and parameterization are very powerful but add a warning:
</p>
<dl><dd>"Dynamic, highly parameterized software is harder to understand and build than more static software." (Gang of Four 1995:21)</dd></dl>
<p>The authors further distinguish between '<a href="Object_composition#Aggregation" title="Object composition">Aggregation</a>', where one object 'has' or 'is part of' another object (implying that an aggregate object and its owner have identical lifetimes) and acquaintance, where one object merely 'knows of' another object. Sometimes acquaintance is called 'association' or the 'using' relationship. Acquaintance objects may request operations of each other, but they are not responsible for each other. Acquaintance is a weaker relationship than aggregation and suggests much <a href="Loose_coupling" title="Loose coupling">looser coupling</a> between objects, which can often be desirable for maximum maintainability in designs.
</p><p>The authors employ the term 'toolkit' where others might today use 'class library', as in C# or Java. In their parlance, toolkits are the object-oriented equivalent of subroutine libraries, whereas a '<a href="Software_framework" title="Software framework">framework</a>' is a set of cooperating classes that make up a reusable design for a specific class of software. They state that applications are hard to design, toolkits are harder, and frameworks are the hardest to design.
</p>
<div class="mw-heading mw-heading2"><h2 id="Patterns_by_type">Patterns by type</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Creational">Creational</h3></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Creational_pattern" title="Creational pattern">Creational pattern</a></div>
<p><a href="Creational_pattern" title="Creational pattern">Creational patterns</a> are ones that create objects, rather than having to instantiate objects directly. This gives the program more flexibility in deciding which objects need to be created for a given case.
</p>
<ul><li><a href="Abstract_factory_pattern" title="Abstract factory pattern">Abstract factory</a> groups object factories that have a common theme.</li>
<li><a href="Builder_pattern" title="Builder pattern">Builder</a> constructs complex objects by separating construction and representation.</li>
<li><a href="Factory_method_pattern" title="Factory method pattern">Factory method</a> creates objects without specifying the exact class to create.</li>
<li><a href="Prototype_pattern" title="Prototype pattern">Prototype</a> creates objects by cloning an existing object.</li>
<li><a href="Singleton_pattern" title="Singleton pattern">Singleton</a> restricts object creation for a class to only one instance.</li></ul>
<div class="mw-heading mw-heading3"><h3 id="Structural">Structural</h3></div>
<p><a href="Structural_pattern" title="Structural pattern">Structural patterns</a> concern class and object composition. They use inheritance to compose interfaces and define ways to compose objects to obtain new functionality.
</p>
<ul><li><a href="Adapter_pattern" title="Adapter pattern">Adapter</a> allows classes with incompatible interfaces to work together by wrapping its own interface around that of an already existing class.</li>
<li><a href="Bridge_pattern" title="Bridge pattern">Bridge</a> decouples an abstraction from its implementation so that the two can vary independently.</li>
<li><a href="Composite_pattern" title="Composite pattern">Composite</a> composes zero-or-more similar objects so that they can be manipulated as one object.</li>
<li><a href="Decorator_pattern" title="Decorator pattern">Decorator</a> dynamically adds/overrides behavior in an existing method of an object.</li>
<li><a href="Facade_pattern" title="Facade pattern">Facade</a> provides a simplified interface to a large body of code.</li>
<li><a href="Flyweight_pattern" title="Flyweight pattern">Flyweight</a> reduces the cost of creating and manipulating a large number of similar objects.</li>
<li><a href="Proxy_pattern" title="Proxy pattern">Proxy</a> provides a placeholder for another object to control access, reduce cost, and reduce complexity.</li></ul>
<div class="mw-heading mw-heading3"><h3 id="Behavioral">Behavioral</h3></div>
<p>Most <a href="Behavioral_pattern" title="Behavioral pattern">behavioral design patterns</a> are specifically concerned with communication between objects.
</p>
<ul><li><a href="Chain-of-responsibility_pattern" title="Chain-of-responsibility pattern">Chain of responsibility</a> delegates commands to a chain of processing objects.</li>
<li><a href="Command_pattern" title="Command pattern">Command</a> creates objects that encapsulate actions and parameters.</li>
<li><a href="Interpreter_pattern" title="Interpreter pattern">Interpreter</a> implements a specialized language.</li>
<li><a href="Iterator_pattern" title="Iterator pattern">Iterator</a> accesses the elements of an object sequentially without exposing its underlying representation.</li>
<li><a href="Mediator_pattern" title="Mediator pattern">Mediator</a> allows <a href="Loose_coupling" title="Loose coupling">loose coupling</a> between classes by being the only class that has detailed knowledge of their methods.</li>
<li><a href="Memento_pattern" title="Memento pattern">Memento</a> provides the ability to restore an object to its previous state (undo).</li>
<li><a href="Observer_pattern" title="Observer pattern">Observer</a> is a publish/subscribe pattern, which allows a number of observer objects to see an event.</li>
<li><a href="State_pattern" title="State pattern">State</a> allows an object to alter its behavior when its internal state changes.</li>
<li><a href="Strategy_pattern" title="Strategy pattern">Strategy</a> allows one of a family of algorithms to be selected on-the-fly at runtime.</li>
<li><a href="Template_method_pattern" title="Template method pattern">Template method</a> defines the skeleton of an algorithm as an abstract class, allowing its subclasses to provide concrete behavior.</li>
<li><a href="Visitor_pattern" title="Visitor pattern">Visitor</a> separates an algorithm from an object structure by moving the hierarchy of methods into one object.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Reception">Reception</h2></div>
<p>In 2005 the ACM <a href="SIGPLAN" title="SIGPLAN">SIGPLAN</a> awarded that year's Programming Languages Achievement Award to the authors, in recognition of the impact of their work "on programming practice and <a href="Programming_language" title="Programming language">programming language</a> design".<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>
</p><p>Criticism has been directed at the concept of <a href="Software_design_pattern" title="Software design pattern">software design patterns</a> generally, and at <i>Design Patterns</i> specifically. A primary criticism of <i>Design Patterns</i> is that its patterns are simply workarounds for missing features in C++, replacing elegant abstract features with lengthy concrete patterns, essentially becoming a "human compiler". <a href="Paul_Graham_(programmer)" title="Paul Graham (programmer)">Paul Graham</a> wrote:<sup id="cite_ref-Graham2002_8-0" class="reference"><a href="#cite_note-Graham2002-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p>
<style data-mw-deduplicate="TemplateStyles:r1244412712">
/* start https://en.wikipedia.org/ */
.mw-parser-output .templatequote{overflow:hidden;margin:1em 0;padding:0 32px}.mw-parser-output .templatequotecite{line-height:1.5em;text-align:left;margin-top:0}@media(min-width:500px){.mw-parser-output .templatequotecite{padding-left:1.6em}}
/* end https://en.wikipedia.org/ */
</style><blockquote class="templatequote"><p>When I see patterns in my programs, I consider it a sign of trouble. The shape of a program should reflect only the problem it needs to solve. Any other regularity in the code is a sign, to me at least, that I'm using abstractions that aren't powerful enough-- often that I'm generating by hand the expansions of some macro that I need to write.</p></blockquote>
<p><a href="Peter_Norvig" title="Peter Norvig">Peter Norvig</a> demonstrates that 16 out of the 23 patterns in <i>Design Patterns</i> are simplified or eliminated by language features in <a href="Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a> or <a href="Dylan_(programming_language)" title="Dylan (programming language)">Dylan</a>.<sup id="cite_ref-Norvig1998_9-0" class="reference"><a href="#cite_note-Norvig1998-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> Related observations were made by Hannemann and <a href="Gregor_Kiczales" title="Gregor Kiczales">Kiczales</a> who implemented several of the 23 design patterns using an <a href="Aspect-oriented_programming" title="Aspect-oriented programming">aspect-oriented programming</a> language (<a href="AspectJ" title="AspectJ">AspectJ</a>) and showed that code-level dependencies were removed from the implementations of 17 of the 23 design patterns and that aspect-oriented programming could simplify the implementations of design patterns.<sup id="cite_ref-Hannemann_2002_10-0" class="reference"><a href="#cite_note-Hannemann_2002-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>
</p><p>In an interview with InformIT in 2009, Erich Gamma stated that the book authors had a discussion in 2005 on how they would have refactored the book and concluded that they would have recategorized some patterns and added a few additional ones, such as extension object/interface, dependency injection, type object, and null object. Gamma wanted to remove the singleton pattern, but there was no consensus among the authors to do so.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Software_design_pattern" title="Software design pattern">Software design pattern</a></li>
<li><a href="Enterprise_Integration_Patterns" title="Enterprise Integration Patterns">Enterprise Integration Patterns</a></li>
<li><a href="GRASP_(object-oriented_design)" title="GRASP (object-oriented design)">GRASP (object-oriented design)</a></li>
<li><a href="Pedagogical_pattern" title="Pedagogical pattern">Pedagogical patterns</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-copies-sold-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-copies-sold_1-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFZehoo2010" class="citation book cs1">Zehoo, Edmund (26 January 2010). Zehoo, Edmund (ed.). <a rel="nofollow" class="external text" href="https://doi.org/10.1007/978-1-4302-2821-9_13"><i>Pro ODP .NET for Oracle Database 11g</i></a>. Apress. pp. <span class="nowrap">351–</span>371. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-1-4302-2821-9_13">10.1007/978-1-4302-2821-9_13</a> – via Springer Link.</cite></span>
</li>
<li id="cite_note-gof1-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-gof1_2-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFHussainKeungKhan2017" class="citation book cs1">Hussain, Shahid; Keung, Jacky; Khan, Arif Ali (2017). <a rel="nofollow" class="external text" href="https://ieeexplore.ieee.org/document/8009931">"The Effect of Gang-of-Four Design Patterns Usage on Design Quality Attributes"</a>. <i>2017 IEEE International Conference on Software Quality, Reliability and Security (QRS)</i>. pp. <span class="nowrap">263–</span>273. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FQRS.2017.37">10.1109/QRS.2017.37</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-5386-0592-9</bdi>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:21343926">21343926</a>.</cite></span>
</li>
<li id="cite_note-gof2-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-gof2_3-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFHunt2013" class="citation book cs1">Hunt, John (26 January 2013). Hunt, John (ed.). <a rel="nofollow" class="external text" href="https://doi.org/10.1007/978-3-319-02192-8_16"><i>Scala Design Patterns: Patterns for Practical Reuse and Design</i></a>. Springer International Publishing. pp. <span class="nowrap">135–</span>136. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-3-319-02192-8_16">10.1007/978-3-319-02192-8_16</a> – via Springer Link.</cite></span>
</li>
<li id="cite_note-gof3-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-gof3_4-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFAlmadiHooshyarAhmad2021" class="citation journal cs1">Almadi, Sara H. S.; Hooshyar, Danial; Ahmad, Rodina Binti (26 January 2021). <a rel="nofollow" class="external text" href="https://doi.org/10.3390%2Fsu131810256">"Bad Smells of Gang of Four Design Patterns: A Decade Systematic Literature Review"</a>. <i>Sustainability</i>. <b>13</b> (18): 10256. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.3390%2Fsu131810256">10.3390/su131810256</a></span>.</cite></span>
</li>
<li id="cite_note-gof4-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-gof4_5-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFMonteiroFernandes2004" class="citation book cs1">Monteiro, Miguel Pessoa; Fernandes, João M. (26 January 2004). <a rel="nofollow" class="external text" href="https://repositorium.sdum.uminho.pt/handle/1822/752"><i>Pitfalls of aspectJ implementations of some of the gang-of-four design patterns</i></a>. Universidad de Extremadura. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-84-688-8889-7</bdi> – via repositorium.uminho.pt.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://c2.com/cgi/wiki?RichardHelm">Richard Helm</a></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.sigplan.org/sites/default/files/report2005.pdf">"SIGPLAN FY '05 Annual Report"</a> <span class="cs1-format">(PDF)</span>.</cite></span>
</li>
<li id="cite_note-Graham2002-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-Graham2002_8-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFGraham2002" class="citation conference cs1"><a href="Paul_Graham_(computer_programmer)" class="mw-redirect" title="Paul Graham (computer programmer)">Graham, Paul</a> (2002). <a rel="nofollow" class="external text" href="http://www.paulgraham.com/icad.html"><i>Revenge of the Nerds</i></a><span class="reference-accessdate">. Retrieved <span class="nowrap">11 August</span> 2012</span>.</cite></span>
</li>
<li id="cite_note-Norvig1998-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-Norvig1998_9-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFNorvig1998" class="citation conference cs1"><a href="Peter_Norvig" title="Peter Norvig">Norvig, Peter</a> (1998). <a rel="nofollow" class="external text" href="http://www.norvig.com/design-patterns/"><i>Design Patterns in Dynamic Languages</i></a>.</cite></span>
</li>
<li id="cite_note-Hannemann_2002-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-Hannemann_2002_10-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFHannemann2002" class="citation conference cs1">Hannemann, Jan (2002). <a rel="nofollow" class="external text" href="http://hannemann.pbworks.com/w/page/16577895/Design%20Pattern"><i>Design pattern implementation in Java and AspectJ</i></a>.</cite></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite id="CITEREFGammaHelmJohnson2009" class="citation interview cs1">Gamma, Erich; Helm, Richard; Johnson, Ralph (22 October 2009). <a rel="nofollow" class="external text" href="http://www.informit.com/articles/article.aspx?p=1404056">"Design Patterns 15 Years Later: An Interview with Erich Gamma, Richard Helm, and Ralph Johnson"</a>. <i>InformIT</i> (Interview). Interviewed by Larry O'Brien. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20190220090254/http://www.informit.com/articles/article.aspx?p=1404056">Archived</a> from the original on 20 February 2019<span class="reference-accessdate">. Retrieved <span class="nowrap">1 September</span> 2019</span>.</cite></span>
</li>
</ol></div></div>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Software_design_patterns225" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div id="Software_design_patterns225" style="font-size:114%;margin:0 4em"><a href="Software_design_pattern" title="Software design pattern">Software design patterns</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Creational_pattern" title="Creational pattern">Creational</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Abstract_factory_pattern" title="Abstract factory pattern">Abstract factory</a></li>
<li><a href="Builder_pattern" title="Builder pattern">Builder</a></li>
<li><a href="Factory_method_pattern" title="Factory method pattern">Factory method</a></li>
<li><a href="Prototype_pattern" title="Prototype pattern">Prototype</a></li>
<li><a href="Singleton_pattern" title="Singleton pattern">Singleton</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Structural_pattern" title="Structural pattern">Structural</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Adapter_pattern" title="Adapter pattern">Adapter</a></li>
<li><a href="Bridge_pattern" title="Bridge pattern">Bridge</a></li>
<li><a href="Composite_pattern" title="Composite pattern">Composite</a></li>
<li><a href="Decorator_pattern" title="Decorator pattern">Decorator</a></li>
<li><a href="Facade_pattern" title="Facade pattern">Facade</a></li>
<li><a href="Flyweight_pattern" title="Flyweight pattern">Flyweight</a></li>
<li><a href="Proxy_pattern" title="Proxy pattern">Proxy</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Behavioral_pattern" title="Behavioral pattern">Behavioral</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Chain-of-responsibility_pattern" title="Chain-of-responsibility pattern">Chain of responsibility</a></li>
<li><a href="Command_pattern" title="Command pattern">Command</a></li>
<li><a href="Interpreter_pattern" title="Interpreter pattern">Interpreter</a></li>
<li><a href="Iterator_pattern" title="Iterator pattern">Iterator</a></li>
<li><a href="Mediator_pattern" title="Mediator pattern">Mediator</a></li>
<li><a href="Memento_pattern" title="Memento pattern">Memento</a></li>
<li><a href="Observer_pattern" title="Observer pattern">Observer</a></li>
<li><a href="State_pattern" title="State pattern">State</a></li>
<li><a href="Strategy_pattern" title="Strategy pattern">Strategy</a></li>
<li><a href="Template_method_pattern" title="Template method pattern">Template method</a></li>
<li><a href="Visitor_pattern" title="Visitor pattern">Visitor</a></li></ul>
</div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Concurrency_pattern" title="Concurrency pattern">Concurrency<br>patterns</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Active_object" title="Active object">Active object</a></li>
<li><a href="Balking_pattern" title="Balking pattern">Balking</a></li>
<li><a href="Binding_properties_pattern" title="Binding properties pattern">Binding properties</a></li>
<li><a href="Double-checked_locking" title="Double-checked locking">Double-checked locking</a></li>
<li><a href="Asynchronous_method_invocation" title="Asynchronous method invocation">Event-based asynchronous</a></li>
<li><a href="Guarded_suspension" title="Guarded suspension">Guarded suspension</a></li>
<li><a href="Join-pattern" title="Join-pattern">Join</a></li>
<li><a href="Lock_(computer_science)" title="Lock (computer science)">Lock</a></li>
<li><a href="Monitor_(synchronization)" title="Monitor (synchronization)">Monitor</a></li>
<li><a href="Proactor_pattern" title="Proactor pattern">Proactor</a></li>
<li><a href="Reactor_pattern" title="Reactor pattern">Reactor</a></li>
<li><a href="Readers%E2%80%93writer_lock" title="Readers–writer lock">Read–write lock</a></li>
<li><a href="Scheduler_pattern" class="mw-redirect" title="Scheduler pattern">Scheduler</a></li>
<li><a href="Scheduled-task_pattern" title="Scheduled-task pattern">Scheduled-task pattern</a></li>
<li><a href="Semaphore_(programming)" title="Semaphore (programming)">Semaphore</a></li>
<li><a href="Thread_pool" title="Thread pool">Thread pool</a></li>
<li><a href="Thread-local_storage" title="Thread-local storage">Thread-local storage</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Architectural_pattern" title="Architectural pattern">Architectural<br>patterns</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Front_controller" title="Front controller">Front controller</a></li>
<li><a href="Interceptor_pattern" title="Interceptor pattern">Interceptor</a></li>
<li><a href="Model%E2%80%93view%E2%80%93controller" title="Model–view–controller">MVC</a>
<ul><li><a href="Model%E2%80%93view%E2%80%93presenter" title="Model–view–presenter">MVP</a></li>
<li><a href="Model%E2%80%93view%E2%80%93viewmodel" title="Model–view–viewmodel">MVVM</a></li></ul></li>
<li><a href="Action%E2%80%93domain%E2%80%93responder" title="Action–domain–responder">ADR</a></li>
<li><a href="Entity_component_system" title="Entity component system">ECS</a></li>
<li><a href="Multitier_architecture" title="Multitier architecture"><i>n</i>-tier</a></li>
<li><a href="Specification_pattern" title="Specification pattern">Specification</a></li>
<li><a href="Publish%E2%80%93subscribe_pattern" title="Publish–subscribe pattern">Publish–subscribe</a></li>
<li><a href="Naked_objects" title="Naked objects">Naked objects</a></li>
<li><a href="Service_locator_pattern" title="Service locator pattern">Service locator</a></li>
<li><a href="Active_record_pattern" title="Active record pattern">Active record</a></li>
<li><a href="Identity_map_pattern" title="Identity map pattern">Identity map</a></li>
<li><a href="Data_access_object" title="Data access object">Data access object</a></li>
<li><a href="Data_transfer_object" title="Data transfer object">Data transfer object</a></li>
<li><a href="Inversion_of_control" title="Inversion of control">Inversion of control</a></li>
<li><a href="JSP_model_2_architecture" title="JSP model 2 architecture">Model 2</a></li>
<li><a href="Broker_pattern" title="Broker pattern">Broker</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other<br>patterns</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Blackboard_design_pattern" class="mw-redirect" title="Blackboard design pattern">Blackboard</a></li>
<li><a href="Business_delegate_pattern" title="Business delegate pattern">Business delegate</a></li>
<li><a href="Composite_entity_pattern" title="Composite entity pattern">Composite entity</a></li>
<li><a href="Dependency_injection" title="Dependency injection">Dependency injection</a></li>
<li><a href="Guard_(computer_science)" title="Guard (computer science)">Guard clause</a></li>
<li><a href="Intercepting_filter_pattern" title="Intercepting filter pattern">Intercepting filter</a></li>
<li><a href="Lazy_loading" title="Lazy loading">Lazy loading</a></li>
<li><a href="Mock_object" title="Mock object">Mock object</a></li>
<li><a href="Null_object_pattern" title="Null object pattern">Null object</a></li>
<li><a href="Object_pool_pattern" title="Object pool pattern">Object pool</a></li>
<li><a href="Servant_(design_pattern)" title="Servant (design pattern)">Servant</a></li>
<li><a href="Twin_pattern" title="Twin pattern">Twin</a></li>
<li><a href="Type_Tunnel_pattern" class="mw-redirect" title="Type Tunnel pattern">Type tunnel</a></li>
<li><a href="Method_chaining" title="Method chaining">Method chaining</a></li>
<li><a href="Delegation_pattern" title="Delegation pattern">Delegation</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Books</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><i></i></li>
<li><i><a href="Enterprise_Integration_Patterns" title="Enterprise Integration Patterns">Enterprise Integration Patterns</a></i></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">People</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Christopher_Alexander" title="Christopher Alexander">Christopher Alexander</a></li>
<li><a href="Erich_Gamma" title="Erich Gamma">Erich Gamma</a></li>
<li><a href="Ralph_Johnson_(computer_scientist)" title="Ralph Johnson (computer scientist)">Ralph Johnson</a></li>
<li><a href="John_Vlissides" title="John Vlissides">John Vlissides</a></li>
<li><a href="Grady_Booch" title="Grady Booch">Grady Booch</a></li>
<li><a href="Kent_Beck" title="Kent Beck">Kent Beck</a></li>
<li><a href="Ward_Cunningham" title="Ward Cunningham">Ward Cunningham</a></li>
<li><a href="Martin_Fowler_(software_engineer)" title="Martin Fowler (software engineer)">Martin Fowler</a></li>
<li><a href="Robert_C._Martin" title="Robert C. Martin">Robert Martin</a></li>
<li><a href="Jim_Coplien" title="Jim Coplien">Jim Coplien</a></li>
<li><a href="Douglas_C._Schmidt" title="Douglas C. Schmidt">Douglas Schmidt</a></li>
<li><a href="Linda_Rising" title="Linda Rising">Linda Rising</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Communities</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="The_Hillside_Group" title="The Hillside Group">The Hillside Group</a></li>
<li><a href="Portland_Pattern_Repository" title="Portland Pattern Repository">Portland Pattern Repository</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">See also</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Anti-pattern" title="Anti-pattern">Anti-pattern</a></li>
<li><a href="Architectural_pattern" title="Architectural pattern">Architectural pattern</a></li></ul>
</div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-29" href="https://en.wikipedia.org/wiki/?title=Design_Patterns&oldid=1303147389">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>